var jq = jQuery;

jq(document).ready(function() {
	// alert("aonz ready");
	/* New posts */
	jq("input#aw-whats-new-submit").click(function() {
		jq.post(ajaxurl, {
			action : 'publish_og_action',
			'current_page_url' : jq(location).attr('href'),
		}, function(response) {

			//alert("response" + response);
		});

		return false;
	});

	/* Comment form submit */
	jq("#commentform input#submit").click(function() {

		var content = jq("textarea#whats-new").val();

		jq.post(ajaxurl, {
			action : 'add_activity_for_comment_post',
			'content' : content,
		}, function(response) {

			//alert("response" + response);
		});
		// alert("Aonz");
		// return false; //This will cancel submit form
	});
});
